﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using SuperSimpleTcp;
using Vision.AlgBase;

namespace Inspection.Helper
{
    internal  class GlobalParame
    {
        #region INotifyPropertyChanged
        public static event EventHandler<PropertyChangedEventArgs> StaticPropertyChanged;

        private static void OnPropertyChanged([CallerMemberName] string name = null)
        {
            if (StaticPropertyChanged != null)
            {
                StaticPropertyChanged.Invoke(null, new PropertyChangedEventArgs(name));
            }
        }
        #endregion INotifyPropertyChanged


        /// <summary>
        ///主控客户端
        /// </summary>
        public static SimpleTcpClient MainTCPClient
        {
            get { return _mainTCPClient; }
            set 
            { 
                _mainTCPClient = value;
                ToolBase.Client = value;
                OnPropertyChanged();
            }
        }
        private static SimpleTcpClient _mainTCPClient;

    }
}
